3.183 \(\int \frac{A+B \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}} \, dx\)

Optimal. Leaf size=191 \[ -\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{(-9 B+7 i A) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{\left (\frac{1}{2}+\frac{i}{2}\right ) (B+i A) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d} \]

[Out]

((1/2 + I/2)*(I*A + B)*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]])/(Sqrt[a]*d) +
 (A + I*B)/(d*Tan[c + d*x]^(3/2)*Sqrt[a + I*a*Tan[c + d*x]]) - ((5*A + (3*I)*B)*Sqrt[a + I*a*Tan[c + d*x]])/(3
*a*d*Tan[c + d*x]^(3/2)) + (((7*I)*A - 9*B)*Sqrt[a + I*a*Tan[c + d*x]])/(3*a*d*Sqrt[Tan[c + d*x]])

________________________________________________________________________________________

Rubi [A]  time = 0.545859, antiderivative size = 191, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.132, Rules used = {3596, 3598, 12, 3544, 205} \[ -\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{(-9 B+7 i A) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{\left (\frac{1}{2}+\frac{i}{2}\right ) (B+i A) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d} \]

Antiderivative was successfully verified.

[In]

Int[(A + B*Tan[c + d*x])/(Tan[c + d*x]^(5/2)*Sqrt[a + I*a*Tan[c + d*x]]),x]

[Out]

((1/2 + I/2)*(I*A + B)*ArcTanh[((1 + I)*Sqrt[a]*Sqrt[Tan[c + d*x]])/Sqrt[a + I*a*Tan[c + d*x]]])/(Sqrt[a]*d) +
 (A + I*B)/(d*Tan[c + d*x]^(3/2)*Sqrt[a + I*a*Tan[c + d*x]]) - ((5*A + (3*I)*B)*Sqrt[a + I*a*Tan[c + d*x]])/(3
*a*d*Tan[c + d*x]^(3/2)) + (((7*I)*A - 9*B)*Sqrt[a + I*a*Tan[c + d*x]])/(3*a*d*Sqrt[Tan[c + d*x]])

Rule 3596

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((a*A + b*B)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(2
*f*m*(b*c - a*d)), x] + Dist[1/(2*a*m*(b*c - a*d)), Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Si
mp[A*(b*c*m - a*d*(2*m + n + 1)) + B*(a*c*m - b*d*(n + 1)) + d*(A*b - a*B)*(m + n + 1)*Tan[e + f*x], x], x], x
] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[m, 0] &&  !GtQ[n,
0]

Rule 3598

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[((A*d - B*c)*(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n + 1))/(f
*(n + 1)*(c^2 + d^2)), x] - Dist[1/(a*(n + 1)*(c^2 + d^2)), Int[(a + b*Tan[e + f*x])^m*(c + d*Tan[e + f*x])^(n
 + 1)*Simp[A*(b*d*m - a*c*(n + 1)) - B*(b*c*m + a*d*(n + 1)) - a*(B*c - A*d)*(m + n + 1)*Tan[e + f*x], x], x],
 x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && LtQ[n, -1]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 3544

Int[Sqrt[(a_) + (b_.)*tan[(e_.) + (f_.)*(x_)]]/Sqrt[(c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)]], x_Symbol] :> Dist[
(-2*a*b)/f, Subst[Int[1/(a*c - b*d - 2*a^2*x^2), x], x, Sqrt[c + d*Tan[e + f*x]]/Sqrt[a + b*Tan[e + f*x]]], x]
 /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{A+B \tan (c+d x)}{\tan ^{\frac{5}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}} \, dx &=\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}+\frac{\int \frac{\sqrt{a+i a \tan (c+d x)} \left (\frac{1}{2} a (5 A+3 i B)-2 a (i A-B) \tan (c+d x)\right )}{\tan ^{\frac{5}{2}}(c+d x)} \, dx}{a^2}\\ &=\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{2 \int \frac{\sqrt{a+i a \tan (c+d x)} \left (-\frac{1}{4} a^2 (7 i A-9 B)-\frac{1}{2} a^2 (5 A+3 i B) \tan (c+d x)\right )}{\tan ^{\frac{3}{2}}(c+d x)} \, dx}{3 a^3}\\ &=\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{(7 i A-9 B) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{4 \int -\frac{3 a^3 (A-i B) \sqrt{a+i a \tan (c+d x)}}{8 \sqrt{\tan (c+d x)}} \, dx}{3 a^4}\\ &=\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{(7 i A-9 B) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}-\frac{(A-i B) \int \frac{\sqrt{a+i a \tan (c+d x)}}{\sqrt{\tan (c+d x)}} \, dx}{2 a}\\ &=\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{(7 i A-9 B) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}+\frac{(a (i A+B)) \operatorname{Subst}\left (\int \frac{1}{-i a-2 a^2 x^2} \, dx,x,\frac{\sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac{\left (\frac{1}{2}+\frac{i}{2}\right ) (i A+B) \tanh ^{-1}\left (\frac{(1+i) \sqrt{a} \sqrt{\tan (c+d x)}}{\sqrt{a+i a \tan (c+d x)}}\right )}{\sqrt{a} d}+\frac{A+i B}{d \tan ^{\frac{3}{2}}(c+d x) \sqrt{a+i a \tan (c+d x)}}-\frac{(5 A+3 i B) \sqrt{a+i a \tan (c+d x)}}{3 a d \tan ^{\frac{3}{2}}(c+d x)}+\frac{(7 i A-9 B) \sqrt{a+i a \tan (c+d x)}}{3 a d \sqrt{\tan (c+d x)}}\\ \end{align*}

Mathematica [A]  time = 3.80479, size = 221, normalized size = 1.16 \[ \frac{e^{-i (c+d x)} (A+B \tan (c+d x)) \left (3 (B+i A) e^{i (c+d x)} \left (-1+e^{2 i (c+d x)}\right )^{3/2} \tanh ^{-1}\left (\frac{e^{i (c+d x)}}{\sqrt{-1+e^{2 i (c+d x)}}}\right )+i A \left (-18 e^{2 i (c+d x)}+7 e^{4 i (c+d x)}+3\right )-3 B \left (-6 e^{2 i (c+d x)}+5 e^{4 i (c+d x)}+1\right )\right )}{6 d \left (-1+e^{2 i (c+d x)}\right ) \sqrt{\tan (c+d x)} \sqrt{a+i a \tan (c+d x)} (A \cos (c+d x)+B \sin (c+d x))} \]

Antiderivative was successfully verified.

[In]

Integrate[(A + B*Tan[c + d*x])/(Tan[c + d*x]^(5/2)*Sqrt[a + I*a*Tan[c + d*x]]),x]

[Out]

((-3*B*(1 - 6*E^((2*I)*(c + d*x)) + 5*E^((4*I)*(c + d*x))) + I*A*(3 - 18*E^((2*I)*(c + d*x)) + 7*E^((4*I)*(c +
 d*x))) + 3*(I*A + B)*E^(I*(c + d*x))*(-1 + E^((2*I)*(c + d*x)))^(3/2)*ArcTanh[E^(I*(c + d*x))/Sqrt[-1 + E^((2
*I)*(c + d*x))]])*(A + B*Tan[c + d*x]))/(6*d*E^(I*(c + d*x))*(-1 + E^((2*I)*(c + d*x)))*(A*Cos[c + d*x] + B*Si
n[c + d*x])*Sqrt[Tan[c + d*x]]*Sqrt[a + I*a*Tan[c + d*x]])

________________________________________________________________________________________

Maple [B]  time = 0.103, size = 746, normalized size = 3.9 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2)/tan(d*x+c)^(5/2),x)

[Out]

1/12/d*(a*(1+I*tan(d*x+c)))^(1/2)/a/tan(d*x+c)^(3/2)*(-3*I*A*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c
)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^2*a-36*B*(a*tan(d*x+c)*(1+I*tan(d*x+c
)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^3-6*I*B*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))
^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^3*a+3*B*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+
c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^4*a+36*A*(a*tan(d*x+c)*(1+I*tan(d*x+
c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^2+28*I*A*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^3+3*
I*A*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c)
+I))*tan(d*x+c)^4*a+6*A*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan
(d*x+c))/(tan(d*x+c)+I))*tan(d*x+c)^3*a+60*I*B*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)^2
-3*B*2^(1/2)*ln(-(-2*2^(1/2)*(-I*a)^(1/2)*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)+I*a-3*a*tan(d*x+c))/(tan(d*x+c
)+I))*tan(d*x+c)^2*a+24*B*(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)*(-I*a)^(1/2)*tan(d*x+c)+8*A*(a*tan(d*x+c)*(1+I
*tan(d*x+c)))^(1/2)*(-I*a)^(1/2))/(a*tan(d*x+c)*(1+I*tan(d*x+c)))^(1/2)/(-tan(d*x+c)+I)^2/(-I*a)^(1/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2)/tan(d*x+c)^(5/2),x, algorithm="maxima")

[Out]

Exception raised: RuntimeError

________________________________________________________________________________________

Fricas [B]  time = 2.08726, size = 1523, normalized size = 7.97 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2)/tan(d*x+c)^(5/2),x, algorithm="fricas")

[Out]

-1/12*(2*sqrt(2)*((7*A + 15*I*B)*e^(6*I*d*x + 6*I*c) - (11*A + 3*I*B)*e^(4*I*d*x + 4*I*c) - 15*(A + I*B)*e^(2*
I*d*x + 2*I*c) + 3*A + 3*I*B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x
+ 2*I*c) + 1))*e^(I*d*x + I*c) + 3*(a*d*e^(6*I*d*x + 6*I*c) - 2*a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I
*c))*sqrt((-2*I*A^2 - 4*A*B + 2*I*B^2)/(a*d^2))*log((I*a*d*sqrt((-2*I*A^2 - 4*A*B + 2*I*B^2)/(a*d^2))*e^(2*I*d
*x + 2*I*c) + sqrt(2)*((I*A + B)*e^(2*I*d*x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(
2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c) + 1))*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/(4*I*A + 4*B)) - 3*(a*d*e^(
6*I*d*x + 6*I*c) - 2*a*d*e^(4*I*d*x + 4*I*c) + a*d*e^(2*I*d*x + 2*I*c))*sqrt((-2*I*A^2 - 4*A*B + 2*I*B^2)/(a*d
^2))*log((-I*a*d*sqrt((-2*I*A^2 - 4*A*B + 2*I*B^2)/(a*d^2))*e^(2*I*d*x + 2*I*c) + sqrt(2)*((I*A + B)*e^(2*I*d*
x + 2*I*c) + I*A + B)*sqrt(a/(e^(2*I*d*x + 2*I*c) + 1))*sqrt((-I*e^(2*I*d*x + 2*I*c) + I)/(e^(2*I*d*x + 2*I*c)
 + 1))*e^(I*d*x + I*c))*e^(-I*d*x - I*c)/(4*I*A + 4*B)))/(a*d*e^(6*I*d*x + 6*I*c) - 2*a*d*e^(4*I*d*x + 4*I*c)
+ a*d*e^(2*I*d*x + 2*I*c))

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))**(1/2)/tan(d*x+c)**(5/2),x)

[Out]

Timed out

________________________________________________________________________________________

Giac [A]  time = 1.4823, size = 258, normalized size = 1.35 \begin{align*} \frac{\left (i + 1\right ) \, \sqrt{-2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 2 \, a^{2}}{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{4} +{\left (-\left (2 i - 2\right ) \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{3} + \left (2 i - 2\right ) \, a^{4}\right )} \sqrt{-2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a + 2 \, a^{2}} \sqrt{i \, a \tan \left (d x + c\right ) + a} B}{2 \,{\left ({\left (i \, a \tan \left (d x + c\right ) + a\right )}^{5} a - 5 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{4} a^{2} + 9 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{3} a^{3} - 7 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{2} a^{4} + 2 \,{\left (i \, a \tan \left (d x + c\right ) + a\right )} a^{5}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((A+B*tan(d*x+c))/(a+I*a*tan(d*x+c))^(1/2)/tan(d*x+c)^(5/2),x, algorithm="giac")

[Out]

1/2*((I + 1)*sqrt(-2*(I*a*tan(d*x + c) + a)*a + 2*a^2)*(I*a*tan(d*x + c) + a)*a^4 + (-(2*I - 2)*(I*a*tan(d*x +
 c) + a)*a^3 + (2*I - 2)*a^4)*sqrt(-2*(I*a*tan(d*x + c) + a)*a + 2*a^2)*sqrt(I*a*tan(d*x + c) + a)*B)/(((I*a*t
an(d*x + c) + a)^5*a - 5*(I*a*tan(d*x + c) + a)^4*a^2 + 9*(I*a*tan(d*x + c) + a)^3*a^3 - 7*(I*a*tan(d*x + c) +
 a)^2*a^4 + 2*(I*a*tan(d*x + c) + a)*a^5)*d)